﻿<UserControl x:Class="Metronome.UI.WPF.MetronomeView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:timeSignature="clr-namespace:DrumMachine.UI.WPF.TimeSignature;assembly=DrumMachine.UI.WPF"
             Height="800" Width="1279">
        <Grid Name="Main">
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="360" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="440" />
            <RowDefinition Height="110" />
            <RowDefinition Height="400" />
        </Grid.RowDefinitions>
        <TabControl Grid.Column="0" Grid.RowSpan="2">
            <TabItem Header="Beats per minute">
                <Grid Name="Bpm" DataContext="{Binding Bpm}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="80" />
                        <ColumnDefinition Width="80" />
                        <ColumnDefinition Width="80" />
                        <ColumnDefinition Width="80" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="50" />
                        <RowDefinition Height="30" />
                        <RowDefinition Height="50" />
                        <RowDefinition Height="50" />
                        <RowDefinition Height="50" />
                        <RowDefinition Height="50" />
                        <RowDefinition Height="50" />
                        <RowDefinition Height="50" />
                        <RowDefinition Height="50" />
                        <RowDefinition Height="50" />
                    </Grid.RowDefinitions>
                    <Button Grid.Column="0" Command="{Binding Decrement}">
                        <TextBlock Text="&lt;" TextAlignment="Center" VerticalAlignment="Center" FontStyle="Normal"
                                   FontSize="30" />
                       
                    </Button>
                    <TextBox x:Name="BpmTextBox" Text="{Binding BpmValue, PresentationTraceSources.TraceLevel=High}"
                             Grid.Column="1" Grid.ColumnSpan="2" TextAlignment="Center" FontSize="30" HorizontalAlignment="Left" Width="162" />

                    <Button Grid.Column="3" Command="{Binding Increment}">
                        <TextBlock Text=">" TextAlignment="Center" VerticalAlignment="Center" FontStyle="Normal"
                                   FontSize="30" />
                    </Button>

                    <Button Content="20" Grid.Column="0" Grid.Row="2" Command="{Binding Set}" CommandParameter="20" />
                    <Button Content="30" Grid.Column="1" Grid.Row="2" Command="{Binding Set}" CommandParameter="30" />
                    <Button Content="40" Grid.Column="2" Grid.Row="2" Command="{Binding Set}" CommandParameter="40" />
                    <Button Content="50" Grid.Column="3" Grid.Row="2" Command="{Binding Set}" CommandParameter="50" />
                    <Button Content="60" Grid.Column="0" Grid.Row="3" Command="{Binding Set}" CommandParameter="60" />
                    <Button Content="70" Grid.Column="1" Grid.Row="3" Command="{Binding Set}" CommandParameter="70" />
                    <Button Content="80" Grid.Column="2" Grid.Row="3" Command="{Binding Set}" CommandParameter="80" />
                    <Button Content="90" Grid.Column="3" Grid.Row="3" Command="{Binding Set}" CommandParameter="90" />
                    <Button Content="100" Grid.Column="0" Grid.Row="4" Command="{Binding Set}" CommandParameter="100" />
                    <Button Content="110" Grid.Column="1" Grid.Row="4" Command="{Binding Set}" CommandParameter="110" />
                    <Button Content="120" Grid.Column="2" Grid.Row="4" Command="{Binding Set}" CommandParameter="120" />
                    <Button Content="130" Grid.Column="3" Grid.Row="4" Command="{Binding Set}" CommandParameter="130" />
                    <Button Content="140" Grid.Column="0" Grid.Row="5" Command="{Binding Set}" CommandParameter="140" />
                    <Button Content="150" Grid.Column="1" Grid.Row="5" Command="{Binding Set}" CommandParameter="150" />
                    <Button Content="160" Grid.Column="2" Grid.Row="5" Command="{Binding Set}" CommandParameter="160" />
                    <Button Content="170" Grid.Column="3" Grid.Row="5" Command="{Binding Set}" CommandParameter="170" />
                    <Button Content="180" Grid.Column="0" Grid.Row="6" Command="{Binding Set}" CommandParameter="180" />
                    <Button Content="190" Grid.Column="1" Grid.Row="6" Command="{Binding Set}" CommandParameter="190" />
                    <Button Content="200" Grid.Column="2" Grid.Row="6" Command="{Binding Set}" CommandParameter="200" />
                    <Button Content="210" Grid.Column="3" Grid.Row="6" Command="{Binding Set}" CommandParameter="210" />
                    <Button Content="220" Grid.Column="0" Grid.Row="7" Command="{Binding Set}" CommandParameter="220" />
                    <Button Content="230" Grid.Column="1" Grid.Row="7" Command="{Binding Set}" CommandParameter="230" />
                    <Button Content="240" Grid.Column="2" Grid.Row="7" Command="{Binding Set}" CommandParameter="240" />
                    <Button Content="250" Grid.Column="3" Grid.Row="7" Command="{Binding Set}" CommandParameter="250" />
                    <Button Content="260" Grid.Column="0" Grid.Row="8" Command="{Binding Set}" CommandParameter="260" />
                    <Button Content="270" Grid.Column="1" Grid.Row="8" Command="{Binding Set}" CommandParameter="270" />
                    <Button Content="280" Grid.Column="2" Grid.Row="8" Command="{Binding Set}" CommandParameter="280" />
                    <Button Content="290" Grid.Column="3" Grid.Row="8" Command="{Binding Set}" CommandParameter="290" />
                    <Button Content="300" Grid.Column="0" Grid.Row="9" Command="{Binding Set}" CommandParameter="300" />
                    <Button Content="310" Grid.Column="1" Grid.Row="9" Command="{Binding Set}" CommandParameter="310" />
                    <Button Content="320" Grid.Column="2" Grid.Row="9" Command="{Binding Set}" CommandParameter="320" />
                </Grid>
            </TabItem>
        </TabControl>
        <TabControl Grid.Column="1" Grid.Row="0">
            <TabItem>
                <Button x:Name="StartButton" Margin="50" Content="{Binding ProgressMessage}" FontSize="50" FontStyle="Oblique"
                        Command="{Binding StopStart}" />
            </TabItem>
        </TabControl>
        <TabControl Grid.Column="2">
            <TabItem Header="Time Signature">
                    <timeSignature:TimeSignatureGrid x:Name="TimeSignaturePanel"/>
            </TabItem>
        </TabControl>
        <TabControl Grid.Column="1" Grid.Row="1" Grid.RowSpan="2">
            <TabItem Header="Audio presets">
                <Grid>
                    <Grid.Resources>
                        <Style TargetType="RadioButton" BasedOn="{StaticResource {x:Type ToggleButton}}">
                            <Style.Setters>
                                <Setter Property="HorizontalContentAlignment" Value="Center" />
                                <Setter Property="VerticalContentAlignment" Value="Center" />
                            </Style.Setters>
                        </Style>
                    </Grid.Resources>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="100" />
                        <ColumnDefinition Width="100" />
                        <ColumnDefinition Width="100" />
                        <ColumnDefinition Width="100" />
                        <ColumnDefinition Width="100" />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="50" />
                        <RowDefinition Height="50" />
                    </Grid.RowDefinitions>
                    <RadioButton Grid.Column="0" Grid.Row="0" Command="{Binding Path=SetAudioPresetCommand}" CommandParameter="DrumStick"
                                 Content="Drum sticks" />
                    <RadioButton Grid.Column="1" Grid.Row="0" Command="{Binding Path=SetAudioPresetCommand}" CommandParameter="RealMetronome1"
                                 Content="Real Metronome" />
                    <RadioButton Grid.Column="3" Grid.Row="0" Command="{Binding Path=SetAudioPresetCommand}" CommandParameter="Drum"
                                 Content="Drum" IsChecked="True"/>
                    <RadioButton Grid.Column="2" Grid.Row="0" Command="{Binding Path=SetAudioPresetCommand}" CommandParameter="Percussion"
                                 Content="Rim Click" />
                </Grid>
            </TabItem>
        </TabControl>
        <TabControl Grid.Column="2" Grid.Row="1" Grid.RowSpan="2">
            <TabItem Header="Options">
                <StackPanel>
                <CheckBox Content="FullScreen" x:Name="FullScreenCheckBox" IsChecked="{Binding Path=IsFullScreen}"/>
                <CheckBox Content="Show counter" x:Name="ShowCounterCheckBox" IsChecked="{Binding Path=ShowCounter}"/>
                </StackPanel>
            </TabItem>
        </TabControl>
        </Grid>
</UserControl>